package cn.tedu.plus.bigint_bigdecimal;

import java.math.BigDecimal;
import java.text.NumberFormat;
import java.util.Locale;

public class NumberFormatDemo2 {
    public static void main(String[] args) {
        double num = 93.365;
        String num2 = "96.2";
        BigDecimal bd1 = BigDecimal.valueOf(num);
        BigDecimal bd2 = new BigDecimal(num2);

        BigDecimal result = bd1.add(bd2);

        System.out.println(result);

        NumberFormat xx = NumberFormat.getCurrencyInstance(Locale.CANADA);

        String cur = xx.format(result);

        System.out.println(cur);

    }
}
